<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>教师修改页面</title>
    <link href="../../static/css/bootstrap.min.css" rel="stylesheet" th:href="@{/static/css/bootstrap.min.css}">
    <!-- Custom styles for this template -->
    <link href="../../static/css/dashboard.css" rel="stylesheet" th:href="@{/static/css/dashboard.css}">
    <script src="../../static/js/jquery-3.6.0.min.js" th:src="@{/static/js/jquery-3.6.0.min.js}"
            type="text/javascript"></script>
</head>
<body>
<!--顶部导航栏-->
<div th:insert="admin/common::topbar"></div>
<div class="container-fluid">
    <div class="row">
        <!--侧边栏-->
        <div th:insert="~{admin/common::sidebar(active='teacherList.html')}">
        </div>
        <!--"-->
        <main class="col-md-9 ml-sm-auto col-lg-10 pt-3 px-4" role="main">
            <form class="container-fluid col-md-5 col-md-pull-3" method="post" th:action="@{/admin/updateTeacher}">
                <p style="color: red" th:if="${not #strings.isEmpty(msg)}" th:text="${msg}"></p>
                <div class="form-group" hidden>
                    <label for="id">教职编号</label>
                    <input class="form-control" id="id" name="tid" placeholder="如果不填，系统会给定一个"
                           th:value="${teacher.getTid()}" type="text">
                    <label for="status">教职编号</label>
                    <input class="form-control" id="status" name="status" placeholder="教学班级数量"
                           th:value="${teacher.getStatus()}" type="text">
                </div>
                <div class="form-group">
                    <label for="name">教师姓名</label>
                    <input class="form-control" id="name" name="tname" placeholder="必须填写新加教师姓名" required
                           th:value="${teacher.getTname()}" type="text">
                </div>
                <div class="form-group">
                    <label>教师性别</label>
                    <br>
                    <div class="form-check form-check-inline">
                        <input class="form-check-input" id="man" name="gender" th:checked="${teacher.getGender()=='男'}"
                               type="radio" value="男">
                        <label class="form-check-label" for="man">男</label>
                    </div>
                    <div class="form-check form-check-inline">
                        <input class="form-check-input" id="women" name="gender"
                               th:checked="${teacher.getGender()=='女'}" type="radio" value="女">
                        <label class="form-check-label" for="women">女</label>
                    </div>
                </div>
                <div class="form-group">
                    <label for="subject">教学科目</label>
                    <select class="form-control" id="subject" name="subject">
                        <option th:each="course:${courseList}" th:selected="${teacher.getSubject()==course.cname}"
                                th:text="${course.cname}" th:value="${course.cname}"></option>
                    </select>
                    <!--  <label for="subject">教学科目</label>
                      <input id="subject" name="subject" type="text" class="form-control" required placeholder="格式：数学">-->
                </div>
                <div class="form-group">
                    <label for="className">教学班级</label>
                    <select class="form-control" id="className" name="teacher_class">
                        <option th:each="classObject:${classInfo}"
                                th:selected="${teacher.getTeacher_class()==classObject.getClass_name()}"
                                th:text="${classObject.class_name}" th:value="${classObject.class_name}"></option>
                    </select>
                </div>
                <button class="btn btn-primary " id="button" type="submit">修改</button>
            </form>
        </main>
    </div>
</div>
<script src="../../static/js/popper.min.js" th:src="@{/static/js/popper.min.js}" type="text/javascript"></script>
<script src="../../static/js/bootstrap.min.js" th:src="@{/static/js/bootstrap.min.js}" type="text/javascript"></script>
<!-- Icons -->
<script src="../../static/js/feather.min.js" th:src="@{/static/js/feather.min.js}" type="text/javascript"></script>
<!-- Graphs -->
<script src="../../static/js/Chart.min.js" th:src="@{/static/js/Chart.min.js}" type="text/javascript"></script>
<script>
    /*可以写弹窗*/
</script>
</body>
</html>